"""Updated chat model fields

Revision ID: 05d388efa33a
Revises: 5df153dccdac
Create Date: 2025-06-06 21:43:01.237387

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '05d388efa33a'
down_revision: Union[str, None] = '5df153dccdac'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('chat', sa.Column('created_at', sa.DateTime(), nullable=False))
    op.add_column('chat', sa.Column('source', sa.String(length=16), nullable=False))
    op.drop_column('chat', 'created')
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('chat', sa.Column('created', sa.DATETIME(), nullable=False))
    op.drop_column('chat', 'source')
    op.drop_column('chat', 'created_at')
    # ### end Alembic commands ###
